home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus Special 23
/
AMIGAplus Sonderheft 23 (2000)(Falke)(DE)[!].iso
/
Updates
/
DOS
/
GetType1.13
/
GT.doc
< prev
next >
Wrap
Text File
|
1999-11-08
|
22KB
|
554 lines
+--------------------------------------------------------------------------+
| Documentation for GetType 1.13 |
| |
| Program & related files are copyright © 1997-1999 Andrew Bell. |
+--------------------------------------------------------------------------+
----------------------------------------------------------------------------
DISCLAIMER
----------------------------------------------------------------------------
BY USING THIS PROGRAM THE USER ACCEPTS FULL LIABILITY FOR ANY DAMAGE THAT
COULD POSSIBLY BE CAUSED BY ITS USAGE OR MISUSE. THE AUTHOR OF THIS SOFTWARE
CANNOT BE HELD RESPONSIBLE FOR ANY DAMAGE.
THIS PROGRAM IS PROVIDED AS-IS. USE THIS PROGRAM AT YOUR OWN RISK.
(After all, you did get it for free!)
----------------------------------------------------------------------------
DISTRIBUTION
----------------------------------------------------------------------------
IT IS PROHIBITED TO DISTRIBUTE GETTYPE WITHOUT THE FOLLOWING FILES:
GetType/GT
GetType/GT.doc
GetType/GT.readme
GetType/GT_Types.txt
GetType/Libs/Idm.library
GetType/Libs/Idm.library.readme
GetType/Libs/FileID.library
GETTYPE IS FREE, AND NO PROFIT SHOULD BE MADE FROM DISTRIBUTING IT.
----------------------------------------------------------------------------
OVERVIEW
----------------------------------------------------------------------------
GetType is a CLI/Shell program that enables the user to identify files via
a Shell/DOS prompt. It requires an 020 processor or better, and at least
version 39 of the Amiga operation system. It also needs Idm.library version
1 or later.
The actual identification work is done by Idm.library (and FileID.library /
xfdmaster.library), currently this library recognizes over 1100 filetypes.
Using the UFID and UXFD, you check now check files with a database of over
2000 filetypes.
I recommend using an 030 CPU or better.
----------------------------------------------------------------------------
INSTALLATION
----------------------------------------------------------------------------
Simply copy the executable (GT) to the C: drawer, and Idm.library to the
LIBS: drawer. Copy FileID.library to LIBS: also, but check to see if you
already have a higher version already installed, if so you don't need to
install it.
----------------------------------------------------------------------------
PROGRAM USAGE
----------------------------------------------------------------------------
Once installation has been completed, you can now start the program. Simply
type GT at the Shell/DOS prompt to start it.
The command line is as follows:
DIR/M
Use this parameter to provide the locations of the files and dirs to
scan.
ALL/S
Enter into sub-directories. When using this option the output can be a
little confusing on big HDs with deep directory trees.
If you don't like the output, consider using the LFMT parameter. The
ALL option is not really designed to be used with the default output.
HL_U/S
Highlight unknown files.
HL_K/S
Highlight known files.
HELP/S
A simple help page giving details on the parameters.
INFO/S
More information on the currently installed version of Idm.library.
TYPES/S
Display a (very long) list of all the filetypes known to the currently
installed version of Idm.library. If this list is too long, then press
CONTROL+C to break.
IDPAT/K
An AmigaDOS pattern/wildcard string, used for finding certain filetypes.
For example, if you wanted to view only the filetypes recognized by
FileID.library then type something similar to this:
GT <PutPathHere> <PutOptionsHere> UFID IDPAT=FID:#?
Note: Uppercase and lowercase are both treated as the same.
DGEN/S
Display general filetypes (Executable/Data) instead of a question mark '?'.
SC=SETCOMMENT/S
Set file's comment with identification string. Don't use this feature if
you place great value on your file comments.
SI=SHOWICONS/S
Show #?.info files. By default GetType does not show icon files.
IOLEN/N
Specify a new read length. This value sets the amount of bytes to be loaded
off the start of each file, while scanning. Idm.library requires GT to load
about 2Kb from the start of each file in order to identify it. By using
this option you can force GT to load a smaller amount of bytes from each
file, doing this will result in less files being identified but a faster
performance.
Any number below 4 will become 4.
NOTE: If you use the UFID option the IOLEN parameter will be forced to at
least 1200 bytes. This is required because FileID.library needs a
minimum of 1200 bytes to be loaded off the start of each file, to
ensure a proper identification check.
This is also the same for xfdmaster.library, about 5KB is required
for proper identification when using the UXFD=USEXFD/S parameter.
For the best result, don't use either the UFID or UXFD parameters with the
IOLEN parameter.
UFID=USEFILEID/S
Tells GT to use FileID.library for any unknown filetype encountered. v8+ of
this library is required. Any IDs made by this library will have a 'FID:'
prefix for clarity (except for LFMT's %2 code).
LFMT/K
Perhaps one of GTs more powerful parameters, using this parameter allows
the user to create simple script/batch files or configure the output. At
the moment the default output is very ugly, so you might want to consider
using this option :) especially if you are using DOpus, DirWork, etc.
This parameter is similar to the LIST command's LFORMAT parameter. The user
will pass a formatted string and GT will parse it with the desired
information.
So for example if we wanted to delete all StoneCracker compressed files
in the C: drawer, we could type the following at a Shell prompt:
GT c: all lfmt="delete %p%n FORCE" idpat=#?stc#? >ram:tempscriptfile
execute ram:tempscriptfile
delete ram:tempscriptfile
In order to build the output string via the LFMT parameter we need
to know what format components codes are available:
%% = insert a literal % character
%P = insert full path (same as %p%n, eg: dh0:mydrawer/myfile)
%p = insert path string (eg: dh0:mydrawer/)
%n = insert filename string (eg: myfile)
%l = insert entry type string (eg: F, LF, PF, etc.)
%s = insert size in bytes string (eg: 153432)
%S = insert size string (rounds off lengths to K, MB, GB, etc.)
%i = insert primary identifcation string.
%1 = insert identification result of Idm.lib
%2 = insert identification result of FileID.lib (without FID: prefix)
%3 = insert identification result of GT name matching.
%4 = insert identification result of xfdmaster.lib (without XFD: prefix)
%c = insert file comment.
%b = insert the amount of blocks the file takes up.
If you insert a '-' and THREE decimal digits immediately after the '%' you
can specify the width in characters you wish the string to fill. The
remainder of the string will be padded with spaces. This will let you
create more readable strings, but is not much use when creating script
files (as shown above).
Remember when using the '-' symbol that you MUST put three decimal digits
after it. So NEVER use %-8n, use %-008n instead.
If you want a full path use %P and not %p%n, remember these format codes
are case sensitive. I hear you ask: What is the point of having %P when
%p%n does the same job? Well the answer is: %P works better with the
'-' symbol. Simple.
If the string is bigger than the number you pass with the '-' symbol, then
the bounds will be broken. If you want to limit the amount of characters
inserted, then you can append a '.' (period) followed by a THREE digit
number that will specify the maximum allowed characters.
It you need spaces in you LFMT string remember to enclose it in "double
quotes" (eg: LFMT="File %n is %i").
If all this seems complicated, thats because it is :) This parameter is
for the advanced Amiga user only.
Believe it or not, bu